<template>
	<view class="img-box m-b-25 radius-15" v-for="item,index in props.data.list" :key="index"
		@click="hanldeClickImage(item)">
		<image class="img" :src="item.image || handleStaticResources('/static/images/common/empty-banner.png')"
			mode="widthFix"></image>
		<view class="btn" v-if="item.buttonText" :style="{'background':item.buttonColor}">
			<text class="tit" :style="{'color':item.textColor}">{{item.buttonText}}</text>
		</view>
	</view>
</template>
<script setup lang="ts">
	import { handleStaticResources, handleAdvertiseDetail } from '@/core/utils';
	import type { PageConfigItemsImgSlideType } from '@/core/models';

	const props = withDefaults(defineProps<{
		data : any,
	}>(), {
		data: {},
	});

	const hanldeClickImage = (item : PageConfigItemsImgSlideType) => {
		handleAdvertiseDetail(Number(item.linkType), item.linkValue);
	}
</script>
<style lang="scss" scoped>
	@import './home-img.scss';
</style>